package com.ideal.manage.esms.config.servletFilter;

import com.ideal.manage.esms.config.shiro.MyShiroFilter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.*;

@Configuration
public class MyWebMvcConfigurerAdapter extends WebMvcConfigurerAdapter {

    @Bean
    MenuFilter menuFilter(){
        return new MenuFilter();
    }

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(menuFilter()).addPathPatterns("/**")
                .excludePathPatterns("/js/**","/css/**","/login","/logout","/ace/**","/error","/test*");
        super.addInterceptors(registry);
    }
}
